package b4.controller
{
	import b4.view.HumanBeingMediator;
	import b4.view.component.humanBeing.HumanBeing;
	
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	public class ShowHumanBeingCommand extends SimpleCommand implements ICommand
	{
		override public function execute(notification:INotification):void
		{
			if (facade.hasMediator(HumanBeingMediator.NAME))
			{
				facade.removeMediator(HumanBeingMediator.NAME);
			}
			else
			{
				var humanBeing:HumanBeing = new HumanBeing();
				facade.registerMediator(new HumanBeingMediator(humanBeing));
			}
		}
	}
}
